package net.lesscoding.session;

import net.lesscoding.session.impl.MemoryGroupSessionImpl;
import net.lesscoding.session.impl.MemorySessionImpl;

/**
 * @author eleven
 * @date 2024/10/31 15:53
 * @apiNote
 */
public class SessionFactory {
    private static Session session;

    private static GroupSession groupSession;

    public static Session session() {
        if (session == null) {
            session = new MemorySessionImpl();
        }
        return session;
    }

    public static GroupSession groupSession() {
        if (groupSession == null) {
            groupSession = new MemoryGroupSessionImpl();
        }
        return groupSession;
    }
}
